package com.iocollege.tinyframe.mapper.system;

import com.iocollege.tinyframe.common.core.MyMapper;
import com.iocollege.tinyframe.entity.system.SysRoleMenu;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author 关注公众号：MarkerHub
 * @since 2021-03-22
 */
public interface SysRoleMenuMapper extends MyMapper<SysRoleMenu> {
    /**
     * 查询菜单使用数量
     *
     * @param menuId 菜单ID
     * @return 结果
     */
    @Select(" select count(1) from sys_role_menu where menu_id = #{menuId}")
    public int checkMenuExistRole(Long menuId);

}
